package com.it.park.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.ResourceCollectionService;
import com.it.park.dao.ResourceCollectionMapper;
import com.it.park.model.ResourceCollection;

@Service("resourceCollectionService")
public class ResourceCollectionServiceImpl extends BaseServiceImpl<ResourceCollection> implements ResourceCollectionService {
	
	@Autowired
	private ResourceCollectionMapper resourceCollectionMapper;

	@Override
	public boolean insertSelective(ResourceCollection record) {
		return resourceCollectionMapper.insertSelective(record)==1;
	}

	@Override
	public ResourceCollection selectByObject(ResourceCollection record) {
		return resourceCollectionMapper.selectByObject(record);
	}

	@Override
	public List<ResourceCollection> selectByUserId(Integer userId) {
		return resourceCollectionMapper.selectByUserId(userId);
	}

	@Override
	public boolean cancelResource(ResourceCollection record) {
		return resourceCollectionMapper.cancelResource(record)==1;
	}

}
